package com.hrbxlh.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

/**
* -------------------------------------------------------
* Copyright (c) 2017, 鑫联华信息科技股份有限公司
* All rights reserved.
* FileName：RelationDao.java
* Description：RelationDao类,负责操作上课课程表
* History：
* Date           Author               Desc
* 2017.4.18		  xzx                 建立
* -------------------------------------------------------
*/

@Repository
public interface RelationDao {

	/**
	 * @description 查询这个教师或这个地点在某天某节课的课程信息
	 * @param Map<String,Object> paramMap  
	 * @return Map<String, String> result true成功，false失败 errorMsg错误信息
	 * @throws Exception
	 */
	public List<Map<String, Object>> getOriginalClassTab(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存课程表信息
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public void saveClassTab(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某个课程对应的选课班级信息 
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getSelectClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  新建选课班级
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void addSelectClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询是否有这个课程这个班级的关联信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelCourseClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存课程与班级的关联信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void saveRelCourseClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询老师与课程的关系有没有
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelCourseTea(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存老师与课程的关系
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void saveRelCourseTea(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询老师与班级的关联信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelClassTea(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存老师与班级的关联信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void saveRelClassTea(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某个班级下的全部学生
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getStuByClassId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存学生与课程关系
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void saveRelStuCourse(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某时间范围内的地点的上课课表信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getSiteClassTab(Map<String, Object> paramMap) throws Exception;
	
	
	/**
	 * @description 管理员的课程管理（排课表的列表可以搜索）
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getManagerCourseTabList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除某条课表信息
	 * @param Map<String,Object> paramMap  relationId
	 * @return 
	 * @throws Exception
	 */
	public void delClassTabById(Map<String, Object> paramMap) throws Exception;

	/**
	 * @description 查询全部可选课课程
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getSelectCourses(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询全部已经排课了的教师的信息 
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getSelectTeacherList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  选课课程的列表 
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getSelectList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某条课程表的全部信息只要id就可以
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public Map<String, Object> getOneRelationById(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  修改已经排好了课表的信息一条
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public void saveClassTabOne(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  获取中间表中各种关联信息
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelaById(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  删除课程与班级关联信息  
	 * @param Map<String,Object> paramMap   
	 * @return 
	 * @throws Exception
	 */
	public void delCourseReClass(Map<String, Object> paramMap) throws Exception;

	/**
	 * @description  删除课程与老师关联信息  
	 * @param Map<String,Object> paramMap   
	 * @return 
	 * @throws Exception
	 */
	public void delCourseReTeacher(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  删除班级与老师关联信息  
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void delClassReTeacher(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  删除学生与课程关联信息
	 * @param Map<String,Object> paramMap   
	 * @return 
	 * @throws Exception
	 */
	public void delStuReCourse(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  获取学生与课程的关联信息
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelStuCourseListById(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  修改教师与课程中间表中的inMark
	 * @param Map<String,Object> paramMap   courseId stuorteaId  inMark
	 * @return 
	 * @throws Exception
	 */
	public void saveInMarkReMark(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  通过relationId查询这个课程的录入人信息
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public Map<String, Object> getInsertTeacherId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  通过参数查询某个课程的排课信息
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> selectTabList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某个选课类型的课程表条数
	 * @param Map<String,Object> paramMap   relationId
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelationBySetMark(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  教师排课剩最后一节的时候进行删除信息的方法
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public void delNormalRel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  学生选课剩最后一节的时候进行删除信息的方法
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public void delSelectRel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  保存relstucou中的couSelectMark
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public void saveSelectMark(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某个老师教的各种类型的课程
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelationBySetMarkATid(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  修改原来上课老师与课程的关联关系类型couSelectMark
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public void saveSelectMarkAll(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询某个课表某节里面对应的选课班级，十九查询出来不是就无结果
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public Map<String, Object> getSelectClassOne(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询这个课这个类型的其他上课老师有多少
	 * @param Map<String,Object> paramMap   myDelMark 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getCourseTeaOtherList(Map<String, Object> paramMap) throws Exception;
		
	/**
	 * @description  查询全部教师与课程之间的关系列表
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public List<Map<String, Object>> getTeaReCourseList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  删除relstucou关系，课程id,老师id，类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delRelStuCou(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除relteaclass,参数为课id，老师id，类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delTeaReClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除relcouclass,参数课id，；类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delRelCouClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除relation表，参数：课id,类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delRelation(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除relstuclass,条件，课id,类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delRelStuClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除task，条件：课id，类型
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delTask(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除学习历史userstudyhistory,条件：课id，类型，
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delUserstudyhistory(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除学习历史userstudyhistory,条件：课id，类型，
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	*/
	public void delExam(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 课程库
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> courseList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个班级下全部学生的信息  分页
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getStuList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某门课程的上课老师信息  类型是教师排课，和既排课又选课的。
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public Map<String, Object> getTeacherByCourseIdAndMark(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 保存老师与班级的关联信息  多加了课程字段
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void saveRelClassTeaCourse(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除课与班级的关系,参数为课程id，班级Id
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void delCourseRelClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除这个班级下学生与这个课程的关联关系
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void delMyStuCourseRel(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询该学生之前的所有课表信息与当前选择的课程的这个类型的课表是否有时间相同地点不同的数据
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRepeatclassTab(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除班级与老师关联信息    根据课程来
	 * @param Map<String,Object> paramMap  
	 * @return 
	 * @throws Exception
	 */
	public void delClassReTeacherNew(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个课程与某个班级是否有关联关系
	 * @param Map<String,Object> 
	 * @return 
	 * @throws Exception
	 */
	public Map<String, Object> getCourseRelationClass(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询一个课的全部任课教师的信息
	 * @param Map<String,Object> 课id 类型couSelectMark
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getCourseTeacher(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除某个课的全部课表
	 * @param Map<String,Object> 课程id  
	 * @return 
	 * @throws Exception
	 */
	public void delClassTabByCourseId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个课程的各种类型的上课教师信息
	 * @param Map<String,Object> 课id 类型couSelectMark
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getCourseTeacherByType(Map<String, Object> paramMap) throws Exception;
	

	/**
	 * @description 查询当前这个老师，这个类型的，除了这个班，还教不教别的班级
	 * @param Map<String,Object> 课id 类型couSelectMark  班级id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getTeacherClasses(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除某个老师的这个课的课表
	 * @param Map<String,Object> 课程id  教师id  
	 * @return 
	 * @throws Exception
	 */
	public void delRelationTabByTeacherId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询这个老师这个课除了这个班级还教了别的班级没有
	 * @param Map<String,Object> 课程id  教师id   班级Id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getTeachClassByCourseId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 删除这个老师和这个课的历史信息
	 * @param Map<String,Object> 课程id  教师id  
	 * @return 
	 * @throws Exception
	 */
	public void delstudyHistoryByCourseIdAndTeacherId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询老师有没有跟班级进行关联
	 * @param Map<String,Object> 教师id 
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getTeachClassByTid(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个学生这个课程他所在班级的这个课时哪个老师教，要id
	 * @param Map<String,Object> 学生id  课程id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getMyTeacherByCourseId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个学生所在的全部的班级（id）
	 * @param Map<String,Object> 学生id  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getStuInClasses(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询这个学生所在的所有班级与这个课的没结课的关联信息，如果有就是true，
	 * @param Map<String,Object> 学生id   课id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getRelationStuSelectMark(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个学生与某个选课班级有没有关联，
	 * @param Map<String,Object> 学生id  课id  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getStuSelectClassList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询某个课的两种类型的课都上的老师
	 * @param Map<String,Object>   课id  
	 * @return 
	 * @throws Exception
	 */
	public Map<String, Object> getTeachAllTeacherByCourseId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 在classrelation表里查，某个课，某个老师的关联信息
	 * @param Map<String,Object> 老师id  课id  
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getClassRelationByCourseIdAndTeacherId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 在classrelation表里查，某个班级的关联信息
	 * @param Map<String,Object> 班级id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getClassRelationByClassId(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description  查询老师有没有跟课程进行关联
	 * @param Map<String,Object> 老师id  课程id
	 * @return 
	 * @throws Exception
	 */
	public List<Map<String, Object>> getTeachClassByCidAndSid(Map<String, Object> paramMap) throws Exception;
	
}